package com.tujia;

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.HashSet;

/**
 * @author: feiwang_6
 * @create: 2020/5/12 11:51
 * @description:
 */
public class FileTestMain {
    public static void main(String[] args) throws Exception {
        HashSet<String> set = new HashSet<>();
        String regex = "conversationId";
        FileReader reader = new FileReader("D:/错误数据.txt");
        BufferedReader bf = new BufferedReader(reader);
        String str;
        while ((str = bf.readLine()) != null){ 
            if(str.contains(regex)){
                set.add(str.trim());
            }
        }
        set.stream().forEach(f -> System.out.println(f));
    }
}
